<script type="text/javascript">
function areyousure()
{
	return confirm('Bạn muốn xóa?');
}
</script>
<div class="btn-group pull-right">
	<a class="btn" href="<?php echo site_url('admin/options/form'); ?>"><i class="icon-plus-sign"></i> Thêm option</a>
</div>

<table class="table table-striped">
	<thead>
		<tr>
			<th>Key</th>
			<th>Value</th>
			<th>Desc</th>
			<th></th>
		</tr>
	</thead>
	
	<?php echo (count($options) < 1)?'<tr><td style="text-align:center;" colspan="2">Không có trang nào</td></tr>':''?>
	<?php if($options):?>
	<tbody>
		<?php
			foreach($options as $option)
			{?>
			<tr <?php if($option->enabled == 0) echo 'class="disabled"'?>>
				<td>
					<?php echo $option->key; ?>
				</td>
				<td>
					<?php echo $option->value; ?>
				</td>
				<td>
					<?php echo $option->desc; ?>
				</td>
				<td>
					<div class="btn-group pull-right">
						<a class="btn" href="<?php echo base_url('admin/options/form/'.$option->id); ?>"><i class="icon-pencil"></i> Sửa</a>
						<a class="btn btn-danger" href="<?php echo base_url('admin/options/delete/'.$option->id); ?>" onclick="return areyousure();"><i class="icon-trash icon-white"></i> Xóa</a>
					</div>
				</td>
			</tr>
			<?php
			}
		?>
	</tbody>
	<?php endif;?>
</table>